<?php

namespace App\Http\Controllers\Api;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Models\CarSerie;

class CarSerieController extends Controller
{
    public function getList(Request $request)
    {
    	$rs['status'] = false;
    	$where['brand_id'] = (int)$request->brand_id;
	    $list = CarSerie::where($where)->select(['id','name'])->get();
	    if($list) {
	    	$rs['status'] = true;
	    	$rs['data'] = $list;
	    	return response()->json($rs);
	    }
	    return response()->json($rs);
    }
    
    
}
